# common settings for all pocketcud projects
# include in al project fles with include(../common.pri)

# make sure 'TEMPLATE' was set before including this one
isEmpty( TEMPLATE ) {
	error( set TEMPLATE vbefore including common.pri )
}

# determine platform, store in PLATFORM variable
PLATFORM = linux
win32 : PLATFORM = win32
linux-arm-g++ : PLATFORM = arm

# common config
CONFIG += warn_on

# turn on debugging for linux only
CONFIG += release
contains( PLATFORM, linux ) {
	CONFIG += debug
	CONFIG -= release
}
# TODO temporaty - debug on all platforms
CONFIG += debug
CONFIG -= release

#debug
message( conifguring for platform: $$PLATFORM )

# use shared libs for uix and static for windows
unix {
	CONFIG += dll
	INCLUDEPATH += ../firmware_driver/ 
}
win32 {
	CONFIG += staticlib
}


# determine destination dir

contains( PLATFORM, arm ) {
	contains( TEMPLATE, app ) {
		DESTDIR=/autostop/bin
	} else {
		DESTDIR=/autostop/lib
	}
	LIBS += -L/autostop/lib
	INCLUDEPATH += /autostop/include
	QT -= sql gui
} else {
	DESTDIR=../out-$${PLATFORM}
	# point linker to output path
	LIBS += -L$${DESTDIR}
}

#store intermediate files in paltform-specific dir
OBJECTS_DIR=.obj-$${PLATFORM}
